package top.tagao.study02_Set;

import java.util.HashSet;

/**
 * @author fu-xiao-liu
 * @Date 2022/4/15 19:43
 */
public class study_02_HashSet {
    public static void main(String[] args) {
        HashSet hashSet = new HashSet();
        hashSet.add(null);
        for (int i = 1; i < 100; i++) {
            hashSet.add(new A(i));
        }
    }
}

class A{
    int i ;

    public A(int i) {
        this.i = i;
    }

    @Override
    public int hashCode() {
       return 100;
    }
}

